package com.meirengu.webview.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.aliyun.openservices.ons.api.Message;
import com.aliyun.openservices.ons.api.bean.ProducerBean;
import com.kwd.rocketmq.RocketmqEvent;
import com.meirengu.common.RedisClient;
import com.meirengu.service.impl.BaseServiceImpl;
import com.meirengu.utils.HttpUtil;
import com.meirengu.webview.dao.KwWxSubscribeDao;
import com.meirengu.webview.model.KwWxSubscribe;
import com.meirengu.webview.service.KwOperationLogService;
import com.meirengu.webview.service.WxMqService;
import org.apache.commons.lang.exception.ExceptionUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;


@Service
public class WxMqServiceImpl extends BaseServiceImpl<KwWxSubscribe> implements WxMqService {

    Logger logger = LoggerFactory.getLogger(WxMqServiceImpl.class);

    @Autowired
    RedisClient redisClient;

    @Autowired
    ProducerBean producer;

    @Autowired
    private KwWxSubscribeDao kwWxSubscribeDao;

    @Autowired
    private KwOperationLogService kwOperationLogService;

    @Value("${producter.topic.kwd.product}")
    private String topicKwdProduct;
    @Value("${Tag.wx.delay3M}")
    private String tagWxDelay3M;
    @Value("${Tag.wx.delay10M}")
    private String tagWxDelay10M;
    @Value("${Tag.wx.delay11M}")
    private String tagWxDelay11M;
    @Value("${Tag.wx.delay20M}")
    private String tagWxDelay20M;
    @Value("${Tag.wx.delay30M}")
    private String tagWxDelay30M;
    @Value("${Tag.wx.delay31M}")
    private String tagWxDelay31M;
    @Value("${Tag.wx.delay40M}")
    private String tagWxDelay40M;
    @Value("${Tag.wx.delay50M}")
    private String tagWxDelay50M;
    @Value("${Tag.wx.delay90M}")
    private String tagWxDelay90M;
    @Value("${Tag.wx.delay1H}")
    private String tagWxDelay1H;
    @Value("${Tag.wx.delay2H}")
    private String tagWxDelay2H;
    @Value("${Tag.wx.delay24H}")
    private String tagWxDelay24H;
    @Value("${Tag.wx.delay36H}")
    private String tagWxDelay36H;

    @Override
    public void sendDelayMsg(Integer id, String openId) {
        Message message5 = new Message();
        message5.setTopic(topicKwdProduct);
        message5.setTag(tagWxDelay10M);
        message5.setBody(id.toString().getBytes());
        long delayTime5 = System.currentTimeMillis() + 1000 * 60 * 10;
        message5.setStartDeliverTime(delayTime5);
        message5.setKey("delay10M" + id);
        producer.send(message5);
        logger.info("delay10M sendRocketMQ message :{}", message5);

        Message message = new Message();
        message.setTopic(topicKwdProduct);
        message.setTag(tagWxDelay20M);
        message.setBody(id.toString().getBytes());
        /*long delayTime = System.currentTimeMillis() + 1000 * 10;*/
        long delayTime = System.currentTimeMillis() + 1000 * 60 * 20;
        message.setStartDeliverTime(delayTime);
        message.setKey("delay20M" + id);
        producer.send(message);
        logger.info("delay20M sendRocketMQ message :{}", message);

        Message message2 = new Message();
        message2.setTopic(topicKwdProduct);
        message2.setTag(tagWxDelay30M);
        message2.setBody(id.toString().getBytes());
        /*long delayTime2 = System.currentTimeMillis() + 1000 * 20;*/
        long delayTime2 = System.currentTimeMillis() + 1000 * 60 * 30;
        message2.setStartDeliverTime(delayTime2);
        message2.setKey("delay30M" + id);
        producer.send(message2);
        logger.info("delay30M sendRocketMQ message :{}", message2);

        Message message3 = new Message();
        message3.setTopic(topicKwdProduct);
        message3.setTag(tagWxDelay40M);
        message3.setBody(id.toString().getBytes());
        /*long delayTime3 = System.currentTimeMillis() + 1000 * 30;*/
        long delayTime3 = System.currentTimeMillis() + 1000 * 60 * 40;
        message3.setStartDeliverTime(delayTime3);
        message3.setKey("delay40M" + id);
        producer.send(message3);
        logger.info("delay40M sendRocketMQ message :{}", message3);

        Message message4 = new Message();
        message4.setTopic(topicKwdProduct);
        message4.setTag(tagWxDelay50M);
        message4.setBody(id.toString().getBytes());
        /*long delayTime4 = System.currentTimeMillis() + 1000 * 40;*/
        long delayTime4 = System.currentTimeMillis() + 1000 * 60 * 50;
        message4.setStartDeliverTime(delayTime4);
        message4.setKey("delay50M" + id);
        producer.send(message4);
        logger.info("delay50M sendRocketMQ message :{}", message4);

        Message message6 = new Message();
        message6.setTopic(topicKwdProduct);
        message6.setTag(tagWxDelay1H);
        message6.setBody(id.toString().getBytes());
        long delayTime6 = System.currentTimeMillis() + 1000 * 60 * 60;
        message6.setStartDeliverTime(delayTime6);
        message6.setKey("delay1H" + id);
        producer.send(message6);
        logger.info("delay1H sendRocketMQ message :{}", message6);

    }

    @Override
    public void sendHhWxDelayMsg(Integer id, String openId,String toUserName) {
        Message message = new Message();
        message.setTopic(topicKwdProduct);
        message.setTag(tagWxDelay10M);
        message.setBody(id.toString().getBytes());
        long delayTime = System.currentTimeMillis() + 1000 * 60 * 10;
        message.setStartDeliverTime(delayTime);
        message.setKey("delay10M" + id);
        producer.send(message);
        logger.info("delay10M sendRocketMQ message :{}", message);

        /**大龙发，小龙发24h消息*/
        if ("gh_6c8d7afc54aa".equals(toUserName) || "gh_3e09676b9bda".equals(toUserName) ) {
            Message message2 = new Message();
            message2.setTopic(topicKwdProduct);
            message2.setTag(tagWxDelay24H);
            message2.setBody(id.toString().getBytes());
            long delayTime2 = System.currentTimeMillis() + 1000 * 60 * 60 * 24;
            message2.setStartDeliverTime(delayTime2);
            message2.setKey("delay24H" + id);
            producer.send(message2);
            logger.info("delay24H sendRocketMQ message :{}", message2);
        }


        /*Message message2 = new Message();
        message2.setTopic(topicKwdProduct);
        message2.setTag(tagWxDelay1H);
        message2.setBody(id.toString().getBytes());
        long delayTime2 = System.currentTimeMillis() + 1000 * 60 * 60;
        message2.setStartDeliverTime(delayTime2);
        message2.setKey("delay1H" + id);
        producer.send(message2);
        logger.info("delay1H sendRocketMQ message :{}", message2);

        Message message3 = new Message();
        message3.setTopic(topicKwdProduct);
        message3.setTag(tagWxDelay90M);
        message3.setBody(id.toString().getBytes());
        *//*long delayTime4 = System.currentTimeMillis() + 1000 * 40;*//*
        long delayTime3 = System.currentTimeMillis() + 1000 * 60 * 90;
        message3.setStartDeliverTime(delayTime3);
        message3.setKey("delay90M" + id);
        producer.send(message3);
        logger.info("delay90M sendRocketMQ message :{}", message3);

        Message message4 = new Message();
        message4.setTopic(topicKwdProduct);
        message4.setTag(tagWxDelay2H);
        message4.setBody(id.toString().getBytes());
        long delayTime4 = System.currentTimeMillis() + 1000 * 60 * 120;
        message4.setStartDeliverTime(delayTime4);
        message4.setKey("delay2H" + id);
        producer.send(message4);
        logger.info("delay2H sendRocketMQ message :{}", message4);*/

    }

    @Override
    public void send36HDelayMsg(Integer id, String openId) {
        Message message5 = new Message();
        message5.setTopic(topicKwdProduct);
        message5.setTag(tagWxDelay3M);
        message5.setBody(id.toString().getBytes());
        long delayTime5 = System.currentTimeMillis() + 1000 * 60 * 3;
        message5.setStartDeliverTime(delayTime5);
        message5.setKey("delay3M" + id);
        producer.send(message5);
        logger.info("delay3M sendRocketMQ message :{}", message5);

        Message message = new Message();
        message.setTopic(topicKwdProduct);
        message.setTag(tagWxDelay11M);
        message.setBody(id.toString().getBytes());
        /*long delayTime = System.currentTimeMillis() + 1000 * 10;*/
        long delayTime = System.currentTimeMillis() + 1000 * 60 * 11;
        message.setStartDeliverTime(delayTime);
        message.setKey("delay11M" + id);
        producer.send(message);
        logger.info("delay11M sendRocketMQ message :{}", message);

        Message message2 = new Message();
        message2.setTopic(topicKwdProduct);
        message2.setTag(tagWxDelay31M);
        message2.setBody(id.toString().getBytes());
        /*long delayTime2 = System.currentTimeMillis() + 1000 * 20;*/
        long delayTime2 = System.currentTimeMillis() + 1000 * 60 * 31;
        message2.setStartDeliverTime(delayTime2);
        message2.setKey("delay31M" + id);
        producer.send(message2);
        logger.info("delay31M sendRocketMQ message :{}", message2);

        Message message3 = new Message();
        message3.setTopic(topicKwdProduct);
        message3.setTag(tagWxDelay2H);
        message3.setBody(id.toString().getBytes());
        /*long delayTime3 = System.currentTimeMillis() + 1000 * 30;*/
        long delayTime3 = System.currentTimeMillis() + 1000 * 60 * 60 * 2;
        message3.setStartDeliverTime(delayTime3);
        message3.setKey("delay2H" + id);
        producer.send(message3);
        logger.info("delay2H sendRocketMQ message :{}", message3);

        Message message4 = new Message();
        message4.setTopic(topicKwdProduct);
        message4.setTag(tagWxDelay24H);
        message4.setBody(id.toString().getBytes());
        /*long delayTime4 = System.currentTimeMillis() + 1000 * 40;*/
        long delayTime4 = System.currentTimeMillis() + 1000 * 60 * 60 * 24;
        message4.setStartDeliverTime(delayTime4);
        message4.setKey("delay24H" + id);
        producer.send(message4);
        logger.info("delay24H sendRocketMQ message :{}", message4);

        Message message6 = new Message();
        message6.setTopic(topicKwdProduct);
        message6.setTag(tagWxDelay36H);
        message6.setBody(id.toString().getBytes());
        long delayTime6 = System.currentTimeMillis() + 1000 * 60 * 60 * 36;
        message6.setStartDeliverTime(delayTime6);
        message6.setKey("delay36H" + id);
        producer.send(message6);
        logger.info("delay36H sendRocketMQ message :{}", message6);
    }


    /** rocketMQ接收消息  */
    /**
     * 3分钟
     */
    @EventListener(condition = "#event.tag=='wx_delay3M'")
    public void wxDelay3M(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                String url = "";
                contentBuffer.append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">\uD83D\uDCB0点我,一键领取5000元急救金</a>");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }

            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"3");*/
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }


    /** rocketMQ接收消息  */
    /**
     * 10分钟
     */
    @EventListener(condition = "#event.tag=='wx_delay10M'")
    public void wxDelay10M(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                String wxAccount = kwWxSubscribe.getToUserName();
                String url = "";

                contentBuffer.append("@" + kwWxSubscribe.getNikeName()).append("，想要大额，快速到账？\n\n");
                contentBuffer.append("请点击这里\ue032").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">点这里</a>").append("\ue032\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();



                /*contentBuffer.append("<a href=\"https://mdzj139.com/loan/index.html?cid="+getChannelCodeByWxAccount(kwWxSubscribe.getToUserName())+"#/market\">\uD83D\uDCB0点我,一键领取5000元急救金</a>");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();*/
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }

            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"3");*/
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }


    /** rocketMQ接收消息  */
    /**
     * 11分钟
     */
    @EventListener(condition = "#event.tag=='wx_delay11M'")
    public void wxDelay11M(RocketmqEvent event) throws Exception {

        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                String url = "";
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("Hi，小妹儿为你准备了一款低息的良心产品\ue032\n\n");
                contentBuffer.append("\ue032 点击 ").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                contentBuffer.append("申请中遇到任何问题，都可以在文章底部留言告诉小编哦！\n");
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }


    /** rocketMQ接收消息  */
    /**
     * 20分钟
     */
    @EventListener(condition = "#event.tag=='wx_delay20M'")
    public void wxDelay20M(RocketmqEvent event) throws Exception {

        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                String url = "";
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("Hi，小妹儿为你准备了一款低息的良心产品\ue032\n\n");
                /*if ("gh_3f1914b0864d".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 点击 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg1#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HGWXACCESSTOKEN");
                } else if ("gh_895ae09a34b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 点击 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WXACCESSTOKEN");
                } else if ("gh_25e40b50f9b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 点击 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg6#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HYWXACCESSTOKEN");
                } else if ("gh_8793e67e61c8".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 点击 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("MFPWXACCESSTOKEN");
                } else if ("gh_13ebf46e724c".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 点击 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WKWXACCESSTOKEN");
                } else if ("gh_1607a31648b0".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 点击 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg5#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("DIGUAWXACCESSTOKEN");
                }*/


                contentBuffer.append("\ue032 点击 ").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【贷款通道】</a>").append("立即申请数据你的贷款！\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                contentBuffer.append("申请中遇到任何问题，都可以在文章底部留言告诉小编哦！\n");
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }

    /** rocketMQ接收消息  */
    /**
     * 30分钟
     */
    @EventListener(condition = "#event.tag=='wx_delay30M'")
    public void wxDelay30M(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                String url = "";
                contentBuffer.append("悄悄告诉你：今天已有6818人成功申请下款\n\n");
                /*if ("gh_3f1914b0864d".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg1#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HGWXACCESSTOKEN");
                } else if ("gh_895ae09a34b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WXACCESSTOKEN");
                } else if ("gh_25e40b50f9b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg6#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HYWXACCESSTOKEN");
                } else if ("gh_8793e67e61c8".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("MFPWXACCESSTOKEN");
                } else if ("gh_13ebf46e724c".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WKWXACCESSTOKEN");
                } else if ("gh_1607a31648b0".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg5#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("DIGUAWXACCESSTOKEN");
                } else if ("gh_56111e0e8374".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxhghh#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HGHUAWXACCESSTOKEN");
                }*/


                contentBuffer.append("\ue231 ").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                contentBuffer.append("申请中遇到任何问题，都可以在文章底部留言告诉小妹哦\n");
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);


                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }

        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }

    /** rocketMQ接收消息  */
    /**
     * 30分钟
     */
    @EventListener(condition = "#event.tag=='wx_delay31M'")
    public void wxDelay31M(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                String url = "";
                contentBuffer.append("悄悄告诉你：今天已有6818人成功申请下款\n\n");
                contentBuffer.append("\ue231 ").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【猛戳申请最高5万额度】</a>").append("\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                contentBuffer.append("申请中遇到任何问题，都可以在文章底部留言告诉小妹哦\n");
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);


                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }

        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }

    /** rocketMQ接收消息  */
    /**
     * 40M
     */
    @EventListener(condition = "#event.tag=='wx_delay40M'")
    public void wxDelay40M(RocketmqEvent event) throws Exception {
        /*KwHandleInfo kwHandleInfo = kwHandleInfoService.detailByKey(event.getKey());*/
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("约吗？\n");
                contentBuffer.append("这里有50000现金等着你来申请！用身份证快至1小时轻松搞定！\n\n");
                String url = "";
                /*if ("gh_3f1914b0864d".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg1#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HGWXACCESSTOKEN");
                } else if ("gh_895ae09a34b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WXACCESSTOKEN");
                } else if ("gh_25e40b50f9b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg6#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HYWXACCESSTOKEN");
                } else if ("gh_8793e67e61c8".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("MFPWXACCESSTOKEN");
                } else if ("gh_13ebf46e724c".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WKWXACCESSTOKEN");
                } else if ("gh_1607a31648b0".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg5#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("DIGUAWXACCESSTOKEN");
                }*/


                contentBuffer.append("\ue032 请点击").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【马上贷款】</a>").append("\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }

        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }


    /** rocketMQ接收消息  */
    /**
     * 50M
     */
    @EventListener(condition = "#event.tag=='wx_delay50M'")
    public void wxDelay50M(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("小妹今日借款提醒：有信用卡就能贷，日费率0.1%\n\n");
                String url = "";
                /*if ("gh_3f1914b0864d".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append(" \ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg1#/market\">【点击极速申请】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HGWXACCESSTOKEN");
                } else if ("gh_895ae09a34b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append(" \ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg#/market\">【点击极速申请】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WXACCESSTOKEN");
                } else if ("gh_25e40b50f9b3".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append(" \ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg6#/market\">【点击极速申请】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HYWXACCESSTOKEN");
                } else if ("gh_8793e67e61c8".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append(" \ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【点击极速申请】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("MFPWXACCESSTOKEN");
                } else if ("gh_13ebf46e724c".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append(" \ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wx#/market\">【点击极速申请】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("WKWXACCESSTOKEN");
                } else if ("gh_1607a31648b0".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append(" \ue231 ").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg5#/market\">【点击极速申请】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("DIGUAWXACCESSTOKEN");
                }*/

                contentBuffer.append(" \ue231 ").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【点击极速申请】</a>").append("\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                contentBuffer.append("申请中遇到任何问题，都可以在文章底部留言告诉小妹哦");
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }

    /** rocketMQ接收消息  */
    /**
     * 90M
     */
    @EventListener(condition = "#event.tag=='wx_delay90M'")
    public void wxDelay90M(RocketmqEvent event) throws Exception {
        /*KwHandleInfo kwHandleInfo = kwHandleInfoService.detailByKey(event.getKey());*/
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("小妹今日借款提醒：有信用卡就能贷，日费率0.1%\n\n");
                String url = "";
                contentBuffer.append("\ue032 请点击").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【马上贷款】</a>").append("\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }

        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }

    /** rocketMQ接收消息  */
    /**
     * 1H
     */
    @EventListener(condition = "#event.tag=='wx_delay1H'")
    public void wxDelay1H(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("@" + kwWxSubscribe.getNikeName()).append("，想要大额，快速到账？\n\n");
                String url = "";
                contentBuffer.append("请点击这里\ue032").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">点这里</a>").append("\ue032\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));

        }
    }


    /** rocketMQ接收消息  */
    /**
     * 2H
     */
    @EventListener(condition = "#event.tag=='wx_delay2H'")
    public void wxDelay2H(RocketmqEvent event) throws Exception {
        /*KwHandleInfo kwHandleInfo = kwHandleInfoService.detailByKey(event.getKey());*/
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("约吗？\n");
                contentBuffer.append("这里有50000现金等着你来申请！用身份证快至1小时轻松搞定！\n\n");
                String url = "";
                /*if ("gh_d71301a42979".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxtg7#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("YJWXACCESSTOKEN");
                } else if ("gh_56111e0e8374".equals(kwWxSubscribe.getToUserName())) {
                    contentBuffer.append("\ue032 请点击").append("<a href=\"https://mdzj139.com/loan/index.html?cid=channel_wxhghh#/market\">【马上贷款】</a>").append("\n\n");
                    url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get("HGHUAWXACCESSTOKEN");
                }*/

                contentBuffer.append("\ue032 请点击").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">【马上贷款】</a>").append("\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }

        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }


    /** rocketMQ接收消息  */
    /**
     * 24H
     */
    @EventListener(condition = "#event.tag=='wx_delay24H'")
    public void wxDelay24H(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("【有人@你】约吗～"+ "/:,@-D/:heart"+"\n\n");
                contentBuffer.append("这里有最高五万等着你！"+"\n\n");
                String url = "";
                contentBuffer.append("闪电审核，极速放款！").append("[Hey]").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">☞最高五万等你贷</a>").append("\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));
            //修改消息为处理完成
            /*kwHandleInfoService.updateStatus(kwHandleInfo.getId(),"4");*/
        }
    }

    /** rocketMQ接收消息  */
    /**
     * 36H
     */
    @EventListener(condition = "#event.tag=='wx_delay36H'")
    public void wxDelay36H(RocketmqEvent event) throws Exception {
        try {
            Integer id = Integer.valueOf(event.getMsg());
            KwWxSubscribe kwWxSubscribe = kwWxSubscribeDao.detail(id);
            if (kwWxSubscribe != null && kwWxSubscribe.getId() != null) {
                JSONObject jsonObject = new JSONObject();
                jsonObject.put("touser", kwWxSubscribe.getFromUserName());
                jsonObject.put("msgtype", "text");
                JSONObject contentJson = new JSONObject();
                StringBuilder contentBuffer = new StringBuilder();
                contentBuffer.append("@" + kwWxSubscribe.getNikeName()).append("，想要大额，快速到账？\n\n");
                String url = "";

                contentBuffer.append("请点击这里\ue032").append("<a href=\"" + getUrlByWxAccount(kwWxSubscribe.getToUserName()) + "#/market\">点这里</a>").append("\ue032\n\n");
                url = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=" + redisClient.get(getAccessTokenKeyByWxAccount(kwWxSubscribe.getToUserName()));
                String contentStr = contentBuffer.toString();
                contentJson.put("content", contentStr);
                jsonObject.put("text", contentJson);
                HttpUtil.HttpResult hr = HttpUtil.doPost(url, jsonObject.toString());
                System.out.println(hr.toString());
            }
        } catch (Exception e) {
            e.printStackTrace();
            logger.error(ExceptionUtils.getFullStackTrace(e));

        }
    }

    /**
     * 后期改为redis中获取
     *
     * @return
     */
    @Override
    public String getUrlByWxAccount(String wxAccount) {
        /**大姐花*/
        if ("gh_ca34fb2663d4".equals(wxAccount)) {
            return "https://h5.kawangdai.com/loan/index.html?cid=channel_djh";
            /**大哥花*/
        } else if ("gh_73502556f538".equals(wxAccount)) {
            return "https://h5.kawangdai.com/loan/index.html?cid=channel_dgh";
            /**大妈花花*/
        } else if ("gh_a3fc947894a9".equals(wxAccount)) {
            return "https://h5.kawangdai.com/loan/index.html?cid=channel_dmhh";
            /**每天有财*/
        } else if ("gh_ef0cf5e9f36a".equals(wxAccount)) {
            return "https://h5.kawangdai.com/loan/index.html?cid=channel_jmdwx";
            /*return "http://www.chaohanjinrong.com/?cid=mtyc";*/
            /**大豆花*/
        } else if ("gh_8a691ad25e95".equals(wxAccount)) {
            return "https://h5.kawangdai.com/loan/index.html?cid=channel_jmdwx";
            /**大龙花*/
        } else if ("gh_6c8d7afc54aa".equals(wxAccount)) {
            return "https://h5.kawangdai.com/loan/index.html?cid=channel_ssjf";
            /**小龙花*/
        } else if ("gh_3e09676b9bda".equals(wxAccount)) {
            return "https://h5.kawangdai.com/loan/index.html?cid=channel_ssjf";
        } else {
            return "";
        }

    }


    /**
     * 后期改为redis中获取
     *
     * @return
     */
    @Override
    public String getAccessTokenKeyByWxAccount(String wxAccount) {
        /**大姐花*/
        if ("gh_ca34fb2663d4".equals(wxAccount)) {
            return "DJHACCESSTOKEN";
            /**大哥花*/
        } else if ("gh_73502556f538".equals(wxAccount)) {
            return "HGHUAWXACCESSTOKEN";
            /**大妈花花*/
        } else if ("gh_a3fc947894a9".equals(wxAccount)) {
            return "DMHHWXACCESSTOKEN";
            /**每天有财*/
        } else if ("gh_ef0cf5e9f36a".equals(wxAccount)) {
            return "JMDWXACCESSTOKEN";
            /**大豆花*/
        } else if ("gh_8a691ad25e95".equals(wxAccount)) {
            return "DDHWXACCESSTOKEN";
            /**大龙花*/
        } else if ("gh_6c8d7afc54aa".equals(wxAccount)) {
            return "DLHWXACCESSTOKEN";
            /**小龙花*/
        } else if ("gh_3e09676b9bda".equals(wxAccount)) {
            return "XLHWXACCESSTOKEN";
        } else {
            return "";
        }
    }


    /**
     * 后期改为redis中获取
     *
     * @return
     */
    @Override
    public String getNameByWxAccount(String wxAccount) {
        if ("gh_ca34fb2663d4".equals(wxAccount)) {
            return "大姐花";
        } else if ("gh_73502556f538".equals(wxAccount)) {
            return "大哥花";
        } else if ("gh_a3fc947894a9".equals(wxAccount)) {
            return "大妈花花";
        } else if ("gh_ef0cf5e9f36a".equals(wxAccount)) {
            return "每天有财";
        } else if ("gh_8a691ad25e95".equals(wxAccount)) {
            return "大豆花";
        } else if ("gh_6c8d7afc54aa".equals(wxAccount)) {
            return "大龙花";
        } else if ("gh_3e09676b9bda".equals(wxAccount)) {
            return "小龙花";
        } else {
            return "";
        }
    }

}
